package testview.zhen.com.myapplication.asm_demo

import java.net.URL

/**
 * @author :create by ldr
 * time:2022/10/27 15:09
 * @descript:
 */
class MyClassLoader() : ClassLoader() {
    override fun findClass(p0: String?): Class<*> {
        return super.findClass(p0)
    }
    fun defineClass(name: String?, b: ByteArray): Class<*>? {
        return defineClass(name, b, 0, b.size)
    }

    override fun definePackage(
        name: String?,
        specTitle: String?,
        specVersion: String?,
        specVendor: String?,
        implTitle: String?,
        implVersion: String?,
        implVendor: String?,
        sealBase: URL?
    ): Package {
        return super.definePackage(
            name,
            specTitle,
            specVersion,
            specVendor,
            implTitle,
            implVersion,
            implVendor,
            sealBase
        )
    }
}